package com.jingdianjichi.project.common.enums;

import lombok.Getter;

/**
 * ClassName:CategoryTypeEnum
 * Package:com.jingdianjichi.subject.common.enums
 * Description:
 *
 * @Author fst
 * @Create 2024/9/28 20:18
 * @Version 1.0
 */
@Getter
public enum CategoryTypeEnum
{
    PRIMARY(1,"岗位大类"),
    SECOND(2,"二级分类");

    public int code;
    public String desc;

   CategoryTypeEnum (int code,String desc)
    {
        this.code=code;
        this.desc=desc;
    }

    public static CategoryTypeEnum getByCode(int codeVal)
    {
        for (CategoryTypeEnum categoryTypeEnum:CategoryTypeEnum.values()) {
            if(categoryTypeEnum.code==codeVal)
            {
                return categoryTypeEnum;
            }
        }
        return null;
    }
}
